<template>
  <div>
      <h1 class="h1">我是ComA组件</h1>
      <div><router-link to="/comb">去往B组件</router-link></div>
      <div><router-link to="/coma?name=Hydra&age=30">去往A组件</router-link></div>
      <div><router-link to="/coma?name=Hydra&age=31">去往A组件</router-link></div>
      <p>name: {{$route.query.name}}</p>
      <p>age: {{$route.query.age}}</p>
  </div>
</template>

<script>
export default {
    created() {
        console.log("comA组件创建")
    }
}
</script>

<style scoped>
    .h1 {
        color: #f00;
    }
</style>
